﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cemit.PolyServer
{
    public static class Time
    {
        /// <summary>
        /// 获取时间戳
        /// </summary>
        public static long GetTimeStamp()
        {
            return Convert.ToInt64(GetTimeSpan().TotalSeconds);

            TimeSpan GetTimeSpan()
                => DateTime.UtcNow - new DateTime(1970, 1, 1);
        }
    }
}
